<%@page import="dao.ClientDAO"%>
<%@page import="bean.Bean"%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="session.jsp" %>
<html>
<head>
<title></title>
<link href="images/main.css" rel="stylesheet" type="text/css">
<script language=Javascript>
<!--
function DoEmpty(params)
{
if (confirm("真的要删除这条记录吗？删除后此记录里的所有内容都将被删除并且无法恢复！"))
window.location = params ;
}
//-->
</script>
<script language="Javascript">
function check()
{
     document.add.submit();
}
</script>
</head>
<body>
<%				
				int id=Integer.parseInt(request.getParameter("id"));
				Bean bean = new Bean();
				ClientDAO dao = new ClientDAO();
				bean = dao.edit(id);
 %>
 <form name="add" method="post" action="../ClientServlet?kind=2">
 <input type="hidden" value="<%=bean.getId()%>" name="id"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td bgcolor="#FFFFFF">

	<br>
      <table width="96%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de">
       
        <tr align="center" bgcolor="#F2FDFF">
          <td colspan="2"  class="optiontitle">修改客户信息</td>
        </tr>
        <tr align="center" bgcolor="#F2FDFF">
          <td width="10%" align="right">姓名：</td>
          <td align="left"><input name="name" type="text" value="<%=bean.getName() %>"  style="width:150px;"> <font color="red">*</font></td>
        </tr>
		<tr align='center' bgcolor='#FFFFFF'>
		  <td align='right' bgcolor="#FFFFFF">联系电话：</td>
		  <td align='left'><input name="phone" type="text" value="<%=bean.getPhone() %>"  style="width:150px;"> <font color="red">*</font></td>
		</tr>
		<tr align='center' bgcolor='#FFFFFF'>
		  <td align='right' bgcolor="#FFFFFF"> 电子邮件：</td>
		  <td align='left'><input name="mail" type="text" value="<%=bean.getMail() %>"  style="width:150px;"> <font color="red">*</font></td>
		</tr>
		<tr align='center' bgcolor='#FFFFFF'>
		  <td align='right' bgcolor="#FFFFFF">描述：</td>
		  <td align='left'>
		  <textarea name="description" cols="60" rows="5"><%=bean.getDescription() %></textarea>
		   <font color="red">*</font></td>
		</tr>
        <tr align="center" bgcolor="#ebf0f7">
          <td  colspan="2" >
		     <INPUT TYPE="hidden" name="action" value="yes">
            <input type="button" name="Submit" value="提交" onClick="check()">
          	<input type="button" name="Submit2" value="返回" onClick="history.back(-1)"></td>
        </tr>
	
      </table> 

    </td>
  </tr>
</table>
	</form>
</body>
</html>